jQuery( function() {
	$( '.lifestream li' ).hover( function() {
		$( '.waiting' ).fadeOut( 'fast' );
		$( this ).children( 'span' ).fadeIn( 200 );
	}).bind( "mouseleave", function() {		
		$( this ).children( 'span' ).fadeOut( 200 );
	} );
	$( '.lifestream' ).bind( "mouseleave", function() {
		$( '.waiting' ).fadeIn( 1000 );
	} );
} );
jQuery(function () {
  $('.widget .widgetcontent').hide();
  $('.widget_show .widgetcontent').show();
  $('.widgettitle').click(
    function() {  
      var checkElement = $(this).next();
      if((checkElement.is('.widgetcontent')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('.widgetcontent')) && (!checkElement.is(':visible'))) {
        $('.widgetcontent:visible').slideUp('normal');
        checkElement.slideDown('normal');
		$('.widget_show').removeClass('widget_show');
		$(this).parent().addClass('widget_show');
        return false;
        }
      }
    );
});
jQuery(function () {
jQuery('.lock').click(function () {
    jQuery('.wall').slideToggleWidth();
});
 
jQuery.fn.extend({
  slideRight: function() {
    return this.each(function() {
      jQuery(this).animate({width: 'hide'},400);
	  $('.lock').removeClass("unlock");
    });
  },
  slideLeft: function() {
    return this.each(function() {
      jQuery(this).animate({width: 'show'},400);
	  $('.lock').addClass("unlock");
    });
  },
  slideToggleWidth: function() {
    return this.each(function() {
      var el = jQuery(this);
      if (el.css('display') == 'none') {
        el.slideLeft();
      } else {
        el.slideRight();
      }
    });
  }
});
});
function updateClock () {
  var mydate=new Date()
	var year=mydate.getYear()
	if (year < 1000) { year+=1900 }
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10) { daym="0"+daym }
	var hours=mydate.getHours()
	var minutes=mydate.getMinutes()
	var seconds=mydate.getSeconds()
	var dn="AM"

	if (hours>=12) { dn="PM" }
	if (hours>23) { hours=0 }
//	if (hours>12) { hours=hours-12 }
//	if (hours==0) { hours=12 }
	if (hours<=9) { hours="0"+hours }
	if (minutes<=9) { minutes="0"+minutes }
	if (seconds<=9) { seconds="0"+seconds }
	var cdate = hours+":"+minutes+":"+seconds;
	document.getElementById("clock").firstChild.nodeValue = cdate;
}
